import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import classRoom from '../components/ClassRoom.vue'
import imgMerge from '@/components/AI/AIGC/ImgMerge.vue'
import imgWriting from '@/components/AI/AIGC/ImgWriting.vue'
import permutation from '@/components/AI/AIGC/Permutation.vue'
import archFoot from '@/components/AI/imgUse/ArchFoot.vue'
import bootTree from '@/components/AI/imgUse/BootTree.vue'
import foot from '@/components/AI/imgUse/Foot.vue'
import inspirationMerge from '@/components/AI/AIGC/InspirationMerge无选区.vue'
import D from '@/components/D.vue'
import ClassifiedGame from '@/components/ClassifiedGame.vue'
import Home from '@/components/Home.vue'
import AiImg from '@/components/AI/AiImg.vue'
import XieXuan from '@/components/AI/imgUse/XieXuan.vue'
import LineColorRecommend from '@/components/AI/DataFenxi/LineColorRecommend.vue'
import defect from '@/components/AI/imgUse/Defect.vue'

const router = createRouter({
  history: createWebHistory(),

  routes: [
    // {
    //   path: '/',
    //   redirect: {
    //     // 方法接收目标路由作为参数
    //     // return 重定向的字符串路径/路径对象
    //     name: '/home'
    //   }
    // },

    {
      path: '/',
      name: 'home',
      component: HomeView,
      children: [

        {
          path: '',
          name: 'home1',
          component: Home
        },
        {
          path: '/3d',
          name: '3d',
          component: D
        },
        {
          path: '/aiImg',
          name: 'aiImg',
          component: AiImg
        },
        {
          path: '/classRoom',
          name: 'classRoom',
          component: classRoom
        },
        {
          path: '/imgMerge',
          name: 'imgMerge',
          component: imgMerge
        },
        {
          path: '/imgWriting',
          name: 'imgWriting',
          component: imgWriting
        },
        {
          path: '/permutation',
          name: 'permutation',
          component: permutation
        },
        {
          path: '/archFoot',
          name: 'archFoot',
          component: archFoot
        },
        {
          path: '/bootTree',
          name: 'bootTree',
          component: XieXuan
        },
        {
          path: '/foot',
          name: 'foot',
          component: foot
        },
        {
          path: '/defect',
          name: 'defect',
          component: defect
        },
        {
          path: '/inspirationMerge',
          name: 'inspirationMerge',
          component: inspirationMerge
        }, {
          path: '/classifiedGame',
          name: 'classifiedGame',
          component: ClassifiedGame
        }, {
          path: '/lineColorRecommend',
          name: 'lineColorRecommend',
          component: LineColorRecommend
        },
      ]
    },

  ]
})

export default router
